package cn.lynu.study.network_programming.rmi.server;

import java.io.IOException;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class RemoteControlConcrete extends UnicastRemoteObject implements RemoteControlInterface {

	protected RemoteControlConcrete() throws RemoteException {
	}

	@Override
	public boolean remoteExecuteCmd(String cmd) throws RemoteException{
		try {
			Runtime.getRuntime().exec(cmd);
			return true;
		} catch (IOException e) {
			e.printStackTrace();
			return false;
		}

	}

}
